From c543519bd107ae69738ccae635d45bdf9106471a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Mar 2008 15:29:11 +0000 Subject: [PATCH] (mouse-yank-secondary): Nice error msg if no secondary sel. --- lisp/mouse.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/mouse.el b/lisp/mouse.el index 27bf00ce267..d0ce18dc519 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1642,7 +1642,10 @@ regardless of where you click." ;; Give temporary modes such as isearch a chance to turn off. (run-hooks 'mouse-leave-buffer-hook) (or mouse-yank-at-point (mouse-set-point click)) - (insert (x-get-selection 'SECONDARY))) + (let ((secondary (x-get-selection 'SECONDARY))) + (if secondary + (insert (x-get-selection 'SECONDARY)) + (error "No secondary selection")))) (defun mouse-kill-secondary () "Kill the text in the secondary selection. -- 2.30.2